Optimal. Leaf size=618 \[ -\frac {\left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right ) \cot (c+d x) E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^3 (a-b) b (a+b)^{3/2} d}-\frac {\left (15 A b^4+a b^3 (5 A-6 B)-a^2 b^2 (21 A+2 B)-6 a^4 C-a^3 b (3 A-2 (6 B+C))\right ) \cot (c+d x) F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^3 b \sqrt {a+b} \left (a^2-b^2\right ) d}+\frac {\sqrt {a+b} (5 A b-2 a B) \cot (c+d x) \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a^4 d}+\frac {A \sin (c+d x)}{a d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (5 A b^2-2 a b B-a^2 (3 A-2 C)\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right ) \tan (c+d x)}{3 a^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 1.02, antiderivative size = 618, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.171, Rules used = {4189, 4145,
4143, 4006, 3869, 3917, 4089} \begin {gather*} \frac {\sqrt {a+b} (5 A b-2 a B) \cot (c+d x) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} \Pi \left (\frac {a+b}{a};\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{a^4 d}-\frac {b \tan (c+d x) \left (-\left (a^2 (3 A-2 C)\right )-2 a b B+5 A b^2\right )}{3 a^2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^{3/2}}-\frac {\cot (c+d x) \left (-6 a^4 C-a^3 b (3 A-2 (6 B+C))-a^2 b^2 (21 A+2 B)+a b^3 (5 A-6 B)+15 A b^4\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} F\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{3 a^3 b d \sqrt {a+b} \left (a^2-b^2\right )}-\frac {\cot (c+d x) \left (-\left (a^4 (3 A-8 C)\right )-14 a^3 b B+26 a^2 A b^2+6 a b^3 B-15 A b^4\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (\sec (c+d x)+1)}{a-b}} E\left (\text {ArcSin}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right )}{3 a^3 b d (a-b) (a+b)^{3/2}}-\frac {b \tan (c+d x) \left (-\left (a^4 (3 A-8 C)\right )-14 a^3 b B+26 a^2 A b^2+6 a b^3 B-15 A b^4\right )}{3 a^3 d \left (a^2-b^2\right )^2 \sqrt {a+b \sec (c+d x)}}+\frac {A \sin (c+d x)}{a d (a+b \sec (c+d x))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3869
Rule 3917
Rule 4006
Rule 4089
Rule 4143
Rule 4145
Rule 4189
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^{5/2}} \, dx &=\frac {A \sin (c+d x)}{a d (a+b \sec (c+d x))^{3/2}}-\frac {\int \frac {\frac {1}{2} (5 A b-2 a B)-a C \sec (c+d x)-\frac {3}{2} A b \sec ^2(c+d x)}{(a+b \sec (c+d x))^{5/2}} \, dx}{a}\\ &=\frac {A \sin (c+d x)}{a d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (5 A b^2-2 a b B-a^2 (3 A-2 C)\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}+\frac {2 \int \frac {-\frac {3}{4} \left (a^2-b^2\right ) (5 A b-2 a B)+\frac {3}{2} a \left (A b^2-a (b B-a C)\right ) \sec (c+d x)-\frac {1}{4} b \left (5 A b^2-2 a b B-a^2 (3 A-2 C)\right ) \sec ^2(c+d x)}{(a+b \sec (c+d x))^{3/2}} \, dx}{3 a^2 \left (a^2-b^2\right )}\\ &=\frac {A \sin (c+d x)}{a d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (5 A b^2-2 a b B-a^2 (3 A-2 C)\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right ) \tan (c+d x)}{3 a^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}-\frac {4 \int \frac {\frac {3}{8} \left (a^2-b^2\right )^2 (5 A b-2 a B)+\frac {1}{4} a \left (5 A b^4+6 a^3 b B-2 a b^3 B-3 a^4 C-a^2 b^2 (9 A+C)\right ) \sec (c+d x)-\frac {1}{8} b \left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right ) \sec ^2(c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{3 a^3 \left (a^2-b^2\right )^2}\\ &=\frac {A \sin (c+d x)}{a d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (5 A b^2-2 a b B-a^2 (3 A-2 C)\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right ) \tan (c+d x)}{3 a^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}-\frac {4 \int \frac {\frac {3}{8} \left (a^2-b^2\right )^2 (5 A b-2 a B)+\left (\frac {1}{8} b \left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right )+\frac {1}{4} a \left (5 A b^4+6 a^3 b B-2 a b^3 B-3 a^4 C-a^2 b^2 (9 A+C)\right )\right ) \sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{3 a^3 \left (a^2-b^2\right )^2}+\frac {\left (b \left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right )\right ) \int \frac {\sec (c+d x) (1+\sec (c+d x))}{\sqrt {a+b \sec (c+d x)}} \, dx}{6 a^3 \left (a^2-b^2\right )^2}\\ &=-\frac {\left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right ) \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^3 (a-b) b (a+b)^{3/2} d}+\frac {A \sin (c+d x)}{a d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (5 A b^2-2 a b B-a^2 (3 A-2 C)\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right ) \tan (c+d x)}{3 a^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}-\frac {(5 A b-2 a B) \int \frac {1}{\sqrt {a+b \sec (c+d x)}} \, dx}{2 a^3}-\frac {\left (15 A b^4+a b^3 (5 A-6 B)-a^2 b^2 (21 A+2 B)-6 a^4 C-a^3 b (3 A-2 (6 B+C))\right ) \int \frac {\sec (c+d x)}{\sqrt {a+b \sec (c+d x)}} \, dx}{6 a^3 (a-b) (a+b)^2}\\ &=-\frac {\left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right ) \cot (c+d x) E\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^3 (a-b) b (a+b)^{3/2} d}-\frac {\left (15 A b^4+a b^3 (5 A-6 B)-a^2 b^2 (21 A+2 B)-6 a^4 C-a^3 b (3 A-2 (6 B+C))\right ) \cot (c+d x) F\left (\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{3 a^3 (a-b) b (a+b)^{3/2} d}+\frac {\sqrt {a+b} (5 A b-2 a B) \cot (c+d x) \Pi \left (\frac {a+b}{a};\sin ^{-1}\left (\frac {\sqrt {a+b \sec (c+d x)}}{\sqrt {a+b}}\right )|\frac {a+b}{a-b}\right ) \sqrt {\frac {b (1-\sec (c+d x))}{a+b}} \sqrt {-\frac {b (1+\sec (c+d x))}{a-b}}}{a^4 d}+\frac {A \sin (c+d x)}{a d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (5 A b^2-2 a b B-a^2 (3 A-2 C)\right ) \tan (c+d x)}{3 a^2 \left (a^2-b^2\right ) d (a+b \sec (c+d x))^{3/2}}-\frac {b \left (26 a^2 A b^2-15 A b^4-14 a^3 b B+6 a b^3 B-a^4 (3 A-8 C)\right ) \tan (c+d x)}{3 a^3 \left (a^2-b^2\right )^2 d \sqrt {a+b \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(20027\) vs. \(2(618)=1236\).
time = 29.20, size = 20027, normalized size = 32.41 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(10318\) vs.
\(2(576)=1152\).
time = 0.36, size = 10319, normalized size = 16.70
method | result | size |
default | \(\text {Expression too large to display}\) | \(10319\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\cos \left (c+d\,x\right )\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )}{{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________